﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EasyStep.Attributes;using EasyStep.TestExecution.Data;using EasyStep.TestExecution.Interfaces;

using OpenQA.Selenium;


namespace EasyStep.TestActions.Actions.Click
{
    [TestAction(typeof(Click), RequireLocator = true, Name = "ById", RequireData = false)]    
    class ClickById : ITestAction<IWebDriver>
    {        
        public void Execute(IWebDriver browser, TestStepResult data, IExecuteDataContext context)
        {
            browser.FindElement(By.Id(data.Locator)).Click();
        }
    }
}
